<?php
session_start();
include_once("function_right.php");
if(!JudgeUserRight()) return FALSE;

$in_array['Name'] = $_GET['name'];
$file = "/ldisk/vpn/ssl/user/". $_GET['name']. ".tar.gz";

if (file_exists($file)) {
    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; filename='.basename($file));
    header('Content-Transfer-Encoding: binary');
    header('Expires: 0');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');
    header('Content-Length: ' . filesize($file));
    ob_clean();
    flush();
    readfile($file);
}

include_once "function_misc_log.php";
logger("Get_CRT", $in_array, "SSL_VPN_Client");

//include "function_web_misc.php";
//PrintSuccessPageAndJump('vpn_ssl_client_list.php');
//echo("<meta http-equiv='refresh'content=0;URL='vpn_ssl_client_list.php'>");
?>
